<?php
namespace PsiFramework\Applications\DefaultApp\Classes\Model;

import("Classes.Model.Object");
import("Classes.Util.UI.LanguageManager");

use \PsiFramework\Classes\Model\Object;
use \PsiFramework\Classes\Util\UI\LanguageManager;

/**
 * PsiFramework
 * Php Simple Framework
 *
 * @author Rémi San
 * @version beta
 */

/**
 * The Gender class describes the information for a gender
 *
 * @package Model
 */
class Gender extends Object
{

    protected /*int*/     $_id ;
    protected /*string*/  $_name ;

    /**
     * Gender constructor
     *
     * @param     int        $id        the id (unique) of the gender
     * @param     string    $name    the name of the gender
     * @return    Gender instance
     */
    public function __construct(/*int*/ $id=null, /*string*/ $name=null)
    {
        $this->_id = $id ;
        $this->_name = $name ;
    }

    /**
     * Getter for the member variable $id
     *
     * @return     int    the id of the gender
     */
    public function getId()
    {
        return $this->_id ;
    }

    /**
     * Setter for the member variable $id
     *
     * @param     int    $id    the id
     */
    public function setId($id)
    {
        $this->_id = $id ;
    }

    /**
     * Getter for the member variable $name
     *
     * @return     int    the name of the gender
     */
    public function getName()
    {
        return $this->_name ;
    }

    /**
     * Setter for the member variable $name
     *
     * @param     string    $name    the name
     */
    public function setName($name)
    {
        $this->_name = $name ;
    }

    /**
     * The toString function
     *
     * @return string
     */
    public function toString()
    {
        $languageManager = LanguageManager::getInstance();
        return $languageManager->getText($this->getName());
    }
}

